﻿namespace Model.Entites
{
    /// <summary>
    /// 后台管理消息任务表，用于消息推送
    /// </summary>
    [SugarTable("T_Message")]
    public class TMessage : ModelStatusBase
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public int CustomerId { get; set; }

        /// <summary>
        /// 消息类型
        /// </summary>
        [SugarColumn(ColumnName = "MsgType")]
        public Enum_MessageType MsgType { get; set; }

        /// <summary>
        /// 消息类型描述
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string MsgTypeDesc { get; set; }

        /// <summary>
        /// 消息内容
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string Remark { get; set; }

        /// <summary>
        /// 消息内容
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string EnRemark { get; set; }

        /// <summary>
        /// 相关ID
        /// </summary>
        public int AboutId { get; set; }

        /// <summary>
        /// 是否发送
        /// </summary>
        public bool IsSend { get; set; }

        /// <summary>
        /// 回收申请
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(AboutId))]
        public TRecycleReq RecycleReq { get; set; }

        /// <summary>
        ///  快递信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(AboutId))]
        public TRecycleSend RecycleSend { get; set; }

        /// <summary>
        /// 客户留言
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(AboutId))]
        public TMsgCtrl MsgCtrl { get; set; }

        /// <summary>
        /// 用户
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(CustomerId))]
        public TCustomerinfo Customer { get; set; }
    }
}